//
//  RootMessageViewController.m
//  DemoProject
//
//  Created by hao on 2018/7/13.
//  Copyright © 2018年 hao. All rights reserved.
//

#import "RootFirstViewController.h"

@interface RootFirstViewController ()

@end

@implementation RootFirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"示例";
    self.view.backgroundColor = kColorWithRGB(230, 230, 230);
    [self setupItem];
}

- (void)setupItem
{
    NSArray *classArr = @[[CoobjcViewController class],
                          [RealmViewController class]];
    NSArray *titleArr = @[@"coobjc协程库",
                          @"Realm数据库"];
    NSMutableArray<SettingItemModel *> *itemsArr = [NSMutableArray array];
    for (int i = 0; i < titleArr.count; i++) {
        SettingItemModel *item = [SettingItemModel settingItemDataWithTitle:titleArr[i] titleColor:nil type:CellRightViewTypeArrow rightViewBlock:nil controller:classArr[i]];
        [itemsArr addObject:item];
        item.normalColor = [UIColor whiteColor];
    }
    
    SettingGroupModel *groupModel = [[SettingGroupModel alloc] initWithSettingItems:itemsArr];
    [self.groupModelArr addObject:groupModel];
    
    [self.tableView reloadData];
}

@end
